package TCP.Test;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

public class Send {
    public static void main(String[] args) throws IOException {
        Scanner scanner =  new Scanner(System.in);
        Socket socket = new Socket("127.0.0.1",10086);
        OutputStream outputStream = socket.getOutputStream();
        while (true) {

            System.out.println("请输入");
            String s = scanner.nextLine();
            if (s.equals("886")){
                break;
            }
            outputStream.write(s.getBytes());
        }

        outputStream.close();
        socket.close();
    }
}
